<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/commons/inc.jsp" %>
<script type="text/javascript" src="${contextPath}/js/ajax.js"></script>

<h3 id="navTitleId">数据导出</h3>
<body id="body">

<%@include file="/commons/showmessage.jsp" %>

<form name="dataform" id="dataform" method="post" action="${contextPath}/data/data.action?method=exportData" >
	<s:hidden name="extype" id="extype"></s:hidden>
	<s:hidden name="filename" id="filename"></s:hidden>
	
	<table>
		<tr> 
			<td>
			 	<select name="selextype" id="selextype" onchange="javascript:sel(this);">
	         		<option value="0">请选择导出内容</option>
	         		<option value="1">医院信息管理</option>
					<option value="2">临床分组设定</option>
					<option value="3">病人列表</option>
					<option value="4">具体信息</option>
					<option value="5">个人史</option>	
					<option value="6">生育史</option>	
					<option value="7">家族史</option>	
					<option value="8">伴随并发症情况</option>	
					<option value="9">体格测试</option>	
					<option value="10">营养调查</option>
	         		<option value="11">营养治疗</option>
					<option value="12">营养随访</option>
					<option value="13">运动调查</option>
					<option value="14">运动治疗</option>
					<option value="15">运动随访</option>	
					<option value="16">药物治疗</option>	
					<option value="17">体质调查</option>	
					<option value="18">生存质量</option>	
					<option value="19">证候</option>		
					<option value="20">证候判别结果</option>							
					<option value="21">血糖指标</option>	
					<option value="22">血脂指标</option>	
					<option value="23">胰岛功能</option>	
					<option value="24">血常规</option>	
					<option value="25">肝肾功能</option>	
					<option value="26">尿液检查</option>	
					<option value="27">其他指标</option>	
					<option value="28">检验随访</option>	
	         	</select></td> 	
	         
	         <td align="left" class="form-td">
	         	<input type="button" onclick="expo();" value="导出"></td>
		</tr><!--
		<tr>
			<td colspan="2">
			<input type="file" name="selpath" id="selpath" dataType="Require" msg="路径不能为空"/></td>
		</tr>
	--></table>
</form>

</body>

<style type="text/css">
body {
	height: 100%;
	width: 100%;
}
</style>

<script>
function sel(obj){
	if(obj.options[obj.selectedIndex].value==4){
		var ajax = new postAjax();
		url = "data/data.action?method=getPatientsByUser&";
		//ajax.connect(url,null,getCallback);
	}
}
function getCallback(xmlHttp){
	var re =  xmlHttp.responseText;
}
function expo(){
	var s = $('selextype');
	if(s){
		var now=new Date();
		var time=now.getFullYear()+"年"+   //获取完整的年份(4位,1970-????)
			(now.getMonth()+1)+"月"+      //获取当前月份(0-11,0代表1月)
			now.getDate()+"日"+       //获取当前日(1-31)
			now.getHours()+"点"+      //获取当前小时数(0-23)
			now.getMinutes()+"分"+    //获取当前分钟数(0-59)
			now.getSeconds()+"秒";    //获取当前秒数(0-59)
		var name = s.options[s.selectedIndex].text;
		var v = s.options[s.selectedIndex].value;
		$('dataform').extype.value = v;
		$('dataform').filename.value="d:/"+name+" "+time+".xls";
		$('dataform').submit();
	}
}
</script>